<template>
    <RightList :list="list" @select="log"/>
</template>

<script>
import RightList from "./"
export default {
    components: {
        RightList
    },
    data() {
        return {
            list: [
                {
                    name: "A",
                    children: [
                        {
                            name: "a"
                        },
                        {
                            name: "b",
                            active: true
                        }
                    ]
                },
                {
                    name: "B",
                    children: [
                        {
                            name: "a"
                        },
                        {
                            name: "b",
                            children: [
                                { name: 1, active: true },
                                { name: 2 },
                                { name: 3 }
                            ]
                        },
                        {
                            name: "c"
                        }
                    ]
                },
                {
                    name: "C",
                    active: true
                },
                {
                    name: "D"
                }
            ]
        }
    },
    methods: {
        log(item){
            console.log(item.name);
        }
    }
}
</script>
